//
//  LGHomeTableViewCell.m
//  ligenyun
//
//  Created by apple on 2018/3/23.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGMineDaoWenTableViewCell.h"

@interface LGMineDaoWenTableViewCell ()
@property(nonatomic, strong) STButton     *iconButton;
@property(nonatomic, strong) STLabel     *titleLable;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@end
@implementation LGMineDaoWenTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 150;
}
#pragma mark --SubView
- (void)configSubView{
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 15, 85, 65)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"1"]
                                                image:nil];
    [self addSubview:self.iconButton];
    
    
    
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,self.iconButton.top + 5, 130, 20)
                                                     text:@"stoneobs"
                                                textColor:SecendTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    [self addSubview:self.titleLable];
    
    
    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+10,self.iconButton.top + 5, 180, 20)
                                                    text:@"2018年03月23日"
                                               textColor:SecendTextColor
                                                    font:12
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentRight];
    self.timeLable = timeLable;
    timeLable.right = UIScreenWidth-15;
    [self addSubview:self.timeLable];
    
    NSString * content = @"悼文:\n悲夫! 爱有大而必失，恶有甚而必得,知慧不能去其恶，威力不能全其爱，故前识所用心而圣人罕言焉。若乃柔情累于外物，留曲念于闺房，亦贤俊之所宜废乎!";
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 10,titleLable.bottom, UIScreenWidth - self.iconButton.right, 40)
                                                   text:content
                                              textColor:SecendTextColor
                                                   font:14
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    [NSString lableAutoAdjustheightWithLabel:desLable];
    [self addSubview:self.desLable];
    
}

@end




